<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport"
    content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <title>申请售后</title>
  <link rel="stylesheet" type="text/css" href="__CSS__/api.css" />
  <link rel="stylesheet" type="text/css" href="__CSS__/aui.css" />
  <style>
    body {
      background: #F6F6F6;
    }

    .container {
      padding: 0.75rem;
      margin-bottom: 3rem;
    }

    .title {


      margin-bottom: 5px;
      font-size: 14px;
      color: #333;
      line-height: 20px;
      position: relative;
      left: -8px;
      font-weight: 500;
    }

    .title span {
      position: absolute;
      left: -13px;
      top: 2px;
      width: 3px;
      height: 15px;
      background: #EE742B;
      border-radius: 0px 15px 15px 0px;
    }

    .box {
      background: #fff;
      padding: 0.7rem 1rem 7px;
      margin-bottom: 10px;
      border-radius: 10px;
    }

    .box1 {
      background: #fff;
      padding: 0 0.75rem;
      border-radius: 1px;

    }

    .inner {
      height: 2.5rem;
      align-items: center;
    }

    input[type="text"],
    input[type="tel"] {
      height: 2.5rem;
      margin-top: -1px;
      padding: 0;
      text-align: right;
      font-size: 0.8rem;
      color: #333;
      background: transparent;
    }

    input::-webkit-input-placeholder {
      font-size: 0.8rem;
      color: #AAAEB1;
    }

    .left_item {
      font-size: 0.8rem;
      color: #333;
    }

    .xing {
      color: #EE742B;
      font-size: 1rem;
      margin-right: 5px;
      margin-left: -0.35rem;
      font-weight: 500;
      line-height: 0.85rem;
      position: relative;
      top: 2px;
    }

    .arrow {
      width: 0.75rem;
      height: 0.75rem;
    }

    textarea {
      width: 100%;
      height: 4rem;
      padding: 0.45rem 0.6rem;
      background: #fff;
      border-radius: 5px;
      font-size: 0.8rem;
      color: #333;
      word-wrap: break-word;
      word-break: break-all;
      overflow-y: auto;
      margin: 0.65rem 0 0.75rem;
      border: 1px solid rgba(189, 189, 189, 0.5);
    }

    textarea::-webkit-input-placeholder {
      font-size: 0.6rem;
      color: #BDBDBD;
    }

    .btnBox {
      width: 100%;
    }

    .btn {
      width: 100%;
      height: 2.5rem;
      line-height: 2.5rem;
      text-align: center;
      font-size: 0.8rem;
      color: #fff;
      position: fixed;
      bottom: 0;
      left: 0;
      background: #EE7B35;
      border-radius: 10px 10px 0px 0px;
    }
  </style>
</head>

<body>
  <header class="aui-bar aui-bar-nav" id="header">
    <a class="aui-pull-left" onclick="history.go(-1);"> <span class="aui-iconfont aui-icon-tu"> </span> </a>
    <div class="aui-title">申请售后</div>
    <a class="aui-pull-right">
      <span class="aui-iconfont"></span>
    </a>
  </header>
  <div class="container">
    <div class="box">
      <div class="title"><span></span>需调换的商品信息</div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">商品名称</div>
        <input type="text" name="h_name" placeholder="请输入" class="flex-con">
      </div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">调换尺码</div>
        <input type="text" name="h_size" placeholder="请输入" class="flex-con">
      </div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">调换数量</div>
        <select name="h_num" class="flex-con" style="background-color: #FFF;	direction: rtl;">
          <option value="">请选择数量</option>
          {for start='1' end='11'}
          <option value="{$i}">{$i}</option>
          {/for}
        </select>
        <img src="__IMG__/light_right.png" alt="" class="arrow">
      </div>
      <div class="inner flex-wrap">
        <div class="xing">*</div>
        <div class="left_item">调换原因</div>
        <select name="h_reason" class="flex-con" style="background-color: #FFF;	direction: rtl;">
          <option value="">请选择原因</option>
          <option value="尺码不合适">尺码不合适</option>
          <option value="质量问题">质量问题</option>
        </select>
        <img src="__IMG__/light_right.png" alt="" class="arrow">
      </div>
    </div>
    <div class="box">
      <div class="title"><span></span>物流信息</div>
      <div class="inner flex-wrap underLine">
        <div class="xing">*</div>
        <div class="left_item">物流公司</div>
        <input type="text" name="h_express" placeholder="请输入" class="flex-con">
      </div>
      <div class="inner flex-wrap">
        <div class="xing">*</div>
        <div class="left_item">物流单号</div>
        <input type="text" name="h_express_no" placeholder="请输入" class="flex-con">
      </div>
    </div>
    <div class="box">
      <div class="title"><span></span>备注</div>
      <textarea name="h_remark" cols="30" rows="10" placeholder="请输入" class="flex-con"></textarea>
    </div>
  </div>
  <input type="hidden" name="h_w_id" value="{$data.w_id}" class="flex-con">
  <input type="hidden" name="h_o_id" value="{$data.w_o_id}" class="flex-con">
  <div class="btnBox">
    <div class="btn" onclick="askHuanSubmit()" tapmode>提 交</div>
  </div>
</body>
</html>
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script type="text/javascript">
    function askHuanSubmit() {
        var param = $('.flex-con').serialize();
        $.ajax({
            url:'{:url("Index/askHuan")}',
            data: param, //
            type:'POST',
            dataType:'JSON',
            success: function(returndata){
                alert(returndata.msg);
                if(returndata.code == 200){
                    history.go(-1);
//                    window.location.href=document.referrer;
                }else{
                    return false;
                }
            },
            error:function () {
                alert('Ajax error!');
            }
        })
    }
</script>